﻿
@{
    ViewBag.Title = "SetSpaceMap";
    Layout = "~/Views/Shared/_LayoutMain.cshtml";
}


@section css {
    <link href="~/Assets/css/lib/bootstrap-select.css" rel="stylesheet" />
    <link href="~/Assets/css/lib/bootstrap-datetimepicker.min.css" rel="stylesheet" />
    <link href="~/Assets/css/lib/fileinput.css" rel="stylesheet" />
    <style>
        th {
            text-align: center;
            font-weight: bold;
        }

        td {
            text-align: center;
            vertical-align: middle;
        }

        th {
            text-align: center;
            font-weight: bold;
        }

        #location {
            position: absolute;
            z-index: 100;
            width: 10px;
            height: 10px;
            color: red;
            font-weight: bold;
        }

        #location2 {
            position: absolute;
            z-index: 100;
            width: 10px;
            height: 10px;
            color: red;
            font-weight: bold;
        }

        td {
            text-align: center;
            vertical-align: middle;
        }

        .div-relative {
            position: relative;
        }

        .div-a {
            position: absolute;
        }

        .detail_div {
            background-color: rgba(0,0,0,0.5);
            color: white;
            border-radius: 4px;
            z-index: 999;
            position: fixed;
            width: 300px;
        }

        .detail_text {
            display: none;
            font-size: 16px;
        }
    </style>
}
<div class="page-content" ng-cloak ng-controller="FireControlController" ng-init="AddModel={};GetPlaceTree(AddModel);
     ">

    <div class="load" ng-show="DataLoading">
        <div class="loader">
            <svg version="1.1" id="loader-1" x="0px" y="0px" width="100px" height="100px" viewBox="0 0 50 50" style="enable-background:new 0 0 50 50;" xml:space="preserve">
            <path fill="#000" d="M43.935,25.145c0-10.318-8.364-18.683-18.683-18.683c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615c8.072,0,14.615,6.543,14.615,14.615H43.935z">
            <animateTransform attributeType="xml" attributeName="transform" type="rotate" from="0 25 25" to="360 25 25" dur="1s" repeatCount="indefinite" />
			</path>
		</svg>
            <div class="load-msg" ng-bind="LoadingMsg"></div>
        </div>
    </div>
    <div class="page-heading">
        <h1>消防器材</h1>
        <div class="options">
            <div class="btn-toolbar">
            </div>
        </div>
    </div>
    <ol class="breadcrumb">
        <li><a>消防器材</a></li>
        <li class="active"><a>场所消防器材</a></li>
    </ol>
    <div class="container-fluid">
        <div class="row">
            <form class="form-horizontal row-border">
                <div class="col-lg-3">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            场所选择
                        </div>
                        <div class="panel-body" style="height:600px;overflow-y:scroll;">
                            <div id="tree-default">
                                <ul>
                                    <li data-jstree='{ "icon" : "fa fa-home text-success" }' id="1_{{x.Id}}" ng-repeat="x in ParkTreeList">
                                        <span>{{x.ParkName}}</span>
                                        <ul ng-show="x.BuildingList>0">
                                            <li ng-repeat="y in x.BuildingList" id="2_{{y.Id}}" data-jstree='{ "icon" : "fa fa-building text-primary" }'>
                                                <span>{{y.BuildingName}}</span>
                                                <ul ng-show="y.FloorList>0">
                                                    <li data-jstree='{ "icon" : "fa fa-bookmark" }' id="3_{{z.Id}}" ng-repeat="z in y.FloorList">
                                                        <span> {{z.FloorName}}</span>
                                                        <ul ng-show="z.RoomList>0">
                                                            <li data="{{r.Id}}" id="4_{{r.Id}}" data-jstree='{ "type" : "file" }' ng-repeat="r in z.RoomList">
                                                                {{r.RoomName}}
                                                            </li>
                                                        </ul>
                                                    </li>
                                                </ul>
                                            </li>
                                        </ul>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-lg-9" ng-repeat="x in MapList">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            {{AddModel.SpaceName}}平面图
                        </div>
                        <div class="panel-body">
                            <img ng-src="{{x.ImageInfo.FilePath}}" style="width:100%;"/>
                            <div ng-repeat="y in x.PointList" class="div-a" ng-style="{'left':(y.X*100)+'%','top':(y.Y*100)+'%'}" style="transform:translateX(50%) translateY(50%)">
                                <a ng-mouseover="doMapMouse('struct',y.Id)" ng-mouseleave="MouseLeave('struct',y.Id)">
                                    <img ng-src="{{y.EquType.ImageInfo.FilePath}}" width="30" />
                                </a>
                                <div class="detail_div">
                                    <div id="struct{{y.Id}}" class="detail_text">
                                        <span style="top: -2px; position: relative;padding:5px;"><span class="glyphicon glyphicon-play"> </span><b>类型：</b><span>{{y.EquType.TypeName}}</span></span><br />
                                        <span style="top: -2px; position: relative;padding:5px;"><span class="glyphicon glyphicon-play"> </span><b>设备编号：</b><span>{{y.EquNo}}</span></span><br />
                                        <span style="top: -2px; position: relative;padding:5px;"><span class="glyphicon glyphicon-play"> </span><b>有效期：</b><span>{{y.ValidDate|JSONDate:'yyyy-MM-dd'}}</span></span><br />
                                        <span style="top: -2px; position: relative;padding:5px;"><span class="glyphicon glyphicon-play"> </span><b>备注：</b><span>{{y.Remark}}</span></span><br />
                                        <span style="top: -2px; position: relative;padding:5px;"><span class="glyphicon glyphicon-play"> </span><b>现场照片：</b><span><img ng-src="{{y.ImageInfo.FilePath}}" width="30" /></span></span><br />
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            {{AddModel.SpaceName}}消防器材清单 总数：{{x.PointList.length}} <span style="margin-left:5px;" ng-repeat="z in x.TypeCounts">{{z.TypeName}}：{{z.Count}} &nbsp;&nbsp;</span>
                        </div>
                        <div class="panel-body">
                            <div class="row">
                                <table class="table table-striped table-bordered table-hover">
                                    <thead>
                                        <tr>
                                            <th>序号</th>
                                            <th>类型</th>
                                            <th>编号</th>
                                            <th>有效期</th>
                                            <th>备注</th>
                                            <th>上传时间</th>
                                            <th>上传人</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <tr ng-show="x.PointList==null || x.PointList.length==0">
                                            <td colspan="8">暂未上传</td>
                                        </tr>
                                        <tr ng-repeat="y in x.PointList">
                                            <td>{{$index+1}}</td>
                                            <td>{{y.EquType.TypeName}}</td>
                                            <td>{{y.EquNo}}</td>
                                            <td>{{y.ValidDate|JSONDate:'yyyy-MM-dd'}}</td>
                                            <td>{{y.Remark}}</td>
                                            <td>{{y.UpdateTime|JSONDate:'yyyy-MM-dd HH:mm'}}</td>
                                            <td>{{y.UpdateUser}}</td>
                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>


            </form>
        </div>
    </div>
</div>


@section Js{
    <script src="~/Assets/js/pg/FireControl.js?v=@DateTime.Now.ToString("yyMMddHHmm")"></script>
    <script src="~/Assets/js/libs/moment.min.js"></script>
    <script src="~/Assets/js/libs/locales/date/zh-cn.js"></script>
    <script src="~/Assets/js/libs/bootstrap-datetimepicker.min.js"></script>
    <script src="~/Assets/js/libs/angularjs-datepicker.js"></script>
    <script src="~/Assets/js/libs/fileinput.js"></script>
    <script src="~/Assets/js/libs/zh.js"></script>
    <script>
        $('#docfiles').fileinput({
            language: 'zh'
        });

        function loading() {
            $("#div_loading").show();
            setTimeout(function () {
                $("#div_loading").hide();
            }, 3000);
        }
    </script>
}



